package com.kzy.demoadmin.web.mapper;


import com.kzy.demoadmin.web.entity.Audit;
import com.kzy.demoadmin.web.entity.Log;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface LogMapper {
    /**
     * 根据id查询日志
     * @param integer
     * @return
     */
    @Select("select * from log where id=#{id}")
    Log findById(@Param("id") Integer integer);

    /**
     * 分页查询
     * @param log
     * @return
     */
    List<Log> searchBy(Log log);

    /**
     * 删除日志
     * @param id
     * @return
     */
    @Delete("delete from log where id=#{id}")
    int deleteById(Integer id);

    /**
     * 新增日志
     * @param log
     */
    void insert(Log log);

    /**
     * 修改日志
     * @param log
     */
    void update(Log log);
}
